<%-- 
    Document   : answersList
    Created on : Oct 17, 2012, 9:15:38 AM
    Author     : DinhThang
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<f:view>
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
            <title>Answer</title>
            <link rel="stylesheet" type="text/css" href="../styles/style.css" />
        </head>
        <body            
            <jsp:include page="../includes/incHeader.jsp" flush="false" />
            <h3>Add new Answer</h3>
            <h:form>
                <h:inputHidden value="#{complaintsBean.answers.answerID}"/>
                <h:inputHidden value="#{complaintsBean.answers.complaintID}"/>
                <h:panelGrid columns="2" style="margin:0 auto">
                    <h:outputText value="Complaint ID:"/>
                    <h:outputText value="#{complaintsBean.answers.complaintID}" />
                    
                    <h:outputText value="Answer Content:"/>
                    <h:inputTextarea value="#{complaintsBean.answers.answerContent}"/>
                    
                    <h:outputText value="IsEnable: "/>
                    <h:selectOneRadio value="#{complaintsBean.answers.isEnable}">
                        <f:selectItem itemLabel="True" itemValue="true"/>
                        <f:selectItem itemLabel="False" itemValue="false"/>
                    </h:selectOneRadio>

                    <h:commandLink value="Back" action="#{complaintsBean.prepareData4DetailAnsBack}">
                        <f:param name="idParam" value="#{complaintsBean.answers.complaintID}"/>
                    </h:commandLink>
                    <h:commandButton action="#{complaintsBean.addNewAnswers}" value="Save"/>
                </h:panelGrid>
            </h:form>

        </body>
    </html>
</f:view>